<?php /* Smarty version Smarty-3.1.18, created on 2018-03-29 17:22:00
         compiled from "/data/www/mystery/protected/modules/webadmin/views/network/export.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1339423167551bba52e01af8-90833384%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'cd47182ae1c46a70d7e045ddf0d4d805e8aba5eb' => 
    array (
      0 => '/data/www/mystery/protected/modules/webadmin/views/network/export.tpl',
      1 => 1494904922,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1339423167551bba52e01af8-90833384',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_551bba52e3e5b3_02394943',
  'variables' => 
  array (
    'banklist' => 0,
    'key' => 0,
    'val' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_551bba52e3e5b3_02394943')) {function content_551bba52e3e5b3_02394943($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("../common/iframe_header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<form name="form1" method="post" action="/webadmin/network/doExport">
    <br/>
    <div class="left pf40">
        筛选网点：
          <select name="bank_id">
              <option value="0">所有</option>
              <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['banklist']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                <option value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['val']->value;?>
</option>
              <?php } ?>
          </select>
          <select name="up_network_id" id="up_network_id"></select>
          <br/>
          <input type="submit"  class="button" value="导出"/>
    </div>
</form>
<script>
$(function(){
    	// 筛选网点
	var html = '<option value="0">所有</option>';
	$('#up_network_id').html(html);
	$('select[name="bank_id"]').change(function(){
		var bank_id = parseInt($(this).val());
		if(bank_id){
			$.ajax({
	 			 type:'get',
	 			 async : true,
				 dataType:"json",
				 data: {'up_network_id':bank_id},
	 			 url:'/webadmin/network/getNet',
	 			 success:function(data){
	 				if(!data.status){
						return false ;
					}else{
						var newHtml = html;
						$.each(data.data, function(i, v){
							newHtml += '<option value="'+i+'">'+v+'</option>';
						});
						$('#up_network_id').html(newHtml);
					}
	 			 }
	 		});
			
		}else{
			$('#up_network_id').html(html);
		}
	});
	
	// 导出
	$('a[name="export"]').click(function(){
		var href = $(this).data('url'),
			bank_id = $('select[name="bank_id"]').val(),
			up_network_id = $('#up_network_id').val(),
			url = href + '?bank_id=' + bank_id + '&up_network_id=' + up_network_id;
		window.location.href = url;
	});
})
</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
